package com.jt.chapter02.controller;

import com.jt.chapter02.BO.UserBO;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jiang tao
 * @date 2022/1/6
 * @description:
 **/
@RestController
public class LoginController {

    @RequestMapping(value = "/login",method = RequestMethod.POST)
    public String login(@RequestBody UserBO userBO){
        System.out.println(userBO.getUsername());
        return "成功";
    }
    @RequestMapping("/hello")
    public String  hello(){
        return "sdf";
    }
}
